import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class UpgradeData {
  String allowLowestVersion;
  String downloadUrl;
  String description;

  ///0 代表强制更新，1代表一般更新，2代表静默，3代表可忽略更新，4代表静默可忽略更新
  int forceUpdate;
  String version;

  UpgradeData(this.allowLowestVersion, this.downloadUrl, this.description, this.forceUpdate, this.version);

  factory UpgradeData.fromJson(Map<String, dynamic> json) {
    return UpgradeData(json['allowLowestVersion'] as String, json['downloadUrl'] as String, json['description'] as String,
        json['forceUpdate'] as int, json['version'] as String);
  }
}
